﻿using System.Collections.Generic;
using Ast.Core.Pe.Definitions;

namespace Ast.Core.Pe
{
    public class RelocatedBlock
    {
        public RelocatedBlock(uint virtualAddress, uint sizeOfBlock)
        {
            VirtualAddress = virtualAddress;
            SizeOfBlock = sizeOfBlock;
            TypeOffsets = new List<RelocationTypeOffset>();
        }

        public uint VirtualAddress { get; set; }

        public uint SizeOfBlock { get; set; }

        public IList<RelocationTypeOffset> TypeOffsets { get; set; }

        public override string ToString()
        {
            return string.Format("Address={0:X8}, Count={1}", VirtualAddress, TypeOffsets.Count);
        }
    }
}